package me.idashu.attg.service;

import java.util.List;
import java.util.Map;

import me.idashu.attg.domain.ScanEntity;
import me.idashu.attg.persistence.ScanMapper;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ScanService {
	@Autowired
	private ScanMapper scanMapper;
	
	public void insertScan(ScanEntity scanEntity){
		scanMapper.insertScan(scanEntity);
	}
	
	public List<ScanEntity> findScansByUser(Map<String, Object> map){
		List<ScanEntity> scans = scanMapper.findScansByUser(map);
		return scans;
	}
	
	public int findCountScanByUser(ScanEntity scanEntity){
		int count = scanMapper.findCountScanByUser(scanEntity);
		return count;
	}

}
